#pragma once
#include <iostream>
#include <unordered_map>
#include <functional>
#include <initializer_list>
#include "Log.hpp"

typedef std::function<int(int, int)> fu_t;


class Task_add
{
    public: 
    Task_add(){}
    Task_add(int a, int b, fu_t ft):a_(a), b_(b), ft_(ft)
    {}

    void operator()(const std::string& th_name)
    {
        Logmessage(1, "线程名：%s %d + %d = %d", th_name.c_str(), a_, b_, ft_(a_, b_));
        delete this;
    }

    ~Task_add()
    {}
private:
    int a_;
    int b_;
    fu_t ft_;
};
